<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dota</title>
    <link href="https://fonts.googleapis.com/css2?family=Arimo:wght@400;500&display=swap" rel="stylesheet">
    <style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        background: rgb(27, 28, 31);
        font-family: 'Arimo', sans-serif;
    }

    .rectangle {
        width: 416px;
        height: 56px;
        position: relative;
        top: 48px;
        border-radius: 56px;
        background: rgba(255, 255, 255, 0.1);
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden; /* Hide the overflow when the menu is not expanded */
    }

    .rectangle.expanded {
      height: auto;
      padding-bottom: 16px; /* Add some padding at the bottom */
    }

    @media screen and (max-width: 600px) {
        .rectangle {
            width: 100%;
            height: 56px;
            margin: 0;
            top: 0;
            border-radius: 0;
        }
        .text {
            display: none;
        }
    }
    .text {
        color: rgb(255, 255, 255);
        font-family: 'Arimo', sans-serif;
        font-size: 20px;
        font-weight: 500;
        line-height: 26px;
        letter-spacing: 0%;
        text-align: center;
    }

    .text:nth-child(2) {
        margin-left: 36px;
        margin-right: 36px;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    .logo {
        position: absolute;
        top: 32px;
        left: 72px;
        width: 86px;
        height: 86px;
        animation: spin 4s linear infinite;
    }

    @media (hover: hover) {
        .logo:hover {
            animation-play-state: paused;
        }
    }

    .menu-icon {
        display: none;
        position: absolute;
        right: 20.5px; /* изменено с 10px на 20px */
        top: 50%;
        transform: translateY(-50%);
        height: 30px;
        width: 30px;
    }

    @media screen and (max-width: 600px) {
        .menu-icon {
            display: block;
        }
        .rectangle {
        position: relative;
        width: 100%;
        height: 56px;
        margin: 0;
        top: 0;
        border-radius: 0;
    }
    }
    </style>
</head>
<body>
    <div class="rectangle">
        <p class="text">Dota 2</p>
        <p class="text">Fortnite</p>
        <p class="text">GTA 5</p>
        <img src="./img/menu-icon.svg" alt="Menu Icon" class="menu-icon">
    </div>
    <img src="./img/logo.svg" alt="logo" class="logo">

    <script>
    document.querySelector('.menu-icon').addEventListener('click', function() {
      document.querySelector('.rectangle').classList.toggle('expanded');
    });
    </script>
</body>
</html>
